package top.yongyan0624.service.impl;

import com.alipay.api.AlipayApiException;
import org.springframework.beans.factory.annotation.Autowired;
import top.yongyan0624.entity.Alipay;
import top.yongyan0624.entity.AlipayGroup;
import top.yongyan0624.mapper.AlipayGroupMapper;
import top.yongyan0624.service.AlipayGroupService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import top.yongyan0624.utils.AlipayUtils;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author yongyan
 * @since 2021-09-13
 */
@Service
public class AlipayGroupServiceImpl extends ServiceImpl<AlipayGroupMapper, AlipayGroup> implements AlipayGroupService {

    @Autowired
    private AlipayUtils alipayUtils;

    @Override
    public String aliPay(AlipayGroup alipayGroup) throws AlipayApiException {
        return alipayUtils.pay(alipayGroup);
    }
}
